<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - 菜谱管理系统</title>
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
    <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" />
    <style>
        .header {
            height: 60px;
            background-color: #fff;
            border-bottom: 1px solid #dee2e6;
            padding: 10px 20px;
            display: flex;
            align-items: center;
        }

        .sidebar {
            position: fixed;
            top: 60px;
            left: 0;
            height: calc(100vh - 60px);
            width: 250px;
            background-color: #f8f9fa;
            border-right: 1px solid #dee2e6;
            z-index: 1000;
            overflow-y: auto;
        }

        .sidebar .nav-link {
            padding: 10px 15px;
            color: #333;
            border-bottom: 1px solid #eee;
        }

        .sidebar .nav-link:hover {
            background-color: #e9ecef;
        }

        .sidebar .nav-link.active {
            background-color: #007bff;
            color: white;
        }

        .main-content {
            margin-left: 250px;
            margin-top: 60px;
            padding: 20px;
        }

        @@media (max-width: 768px) {
            .sidebar {
                width: 100%;
                height: auto;
                position: relative;
                top: 0;
            }

            .main-content {
                margin-left: 0;
                margin-top: 0;
            }
        }
    </style>
</head>
<body>
    <header class="header">
        <h4>菜谱管理系统</h4>
    </header>
    <div class="sidebar">
        <ul class="nav flex-column">
            <li class="nav-item">
                <a class="nav-link" asp-area="" asp-controller="Home" asp-action="Index">
                    <i class="fas fa-home"></i> 首页
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" asp-area="" asp-controller="CookBook" asp-action="Index">
                    <i class="fas fa-book"></i> 菜谱管理
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" asp-area="" asp-controller="Ingredient" asp-action="Index">
                    <i class="fas fa-carrot"></i> 食材管理
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" asp-area="" asp-controller="RecipeIngredient" asp-action="Index">
                    <i class="fas fa-weight"></i> 带量食材
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" asp-area="" asp-controller="WeeklyMenu" asp-action="Index">
                    <i class="fas fa-calendar-week"></i> 每周菜谱
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" asp-area="" asp-controller="DailyPurchase" asp-action="Calculate">
                    <i class="fas fa-shopping-cart"></i> 每日采购食材
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" asp-area="" asp-controller="Database" asp-action="Index">
                    <i class="fas fa-database"></i> 数据库
                </a>
            </li>
        </ul>
    </div>
    <div class="main-content">
        <main role="main" class="pb-3">
            @RenderBody()
        </main>
    </div>

    <footer class="border-top footer text-muted">
        <div class="container">
            &copy; 2025 - 菜谱管理系统
        </div>
    </footer>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script src="~/js/site.js" asp-append-version="true"></script>
    @await RenderSectionAsync("Scripts", required: false)
</body>
</html>